<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>CMS后台管理系统</title>

    <!-- Bootstrap -->
    <link href="/Public/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/Public/assets/admin/css/common.css">
    
</head>
<body>
<div class="container">

    <nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/admin">首页</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="<?php echo U('Link/index');?>">友情链接 </a></li>
                <li><a href="<?php echo U('Photo/index');?>">我的相册</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">内容管理 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo U('Category/index');?>">分类管理</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="<?php echo U('Article/index');?>">文章管理</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="<?php echo U('Article/trash');?>">文章回收站</a></li>
                    </ul>
                </li>
            </ul>
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Search">
                </div>
                <button type="submit" class="btn btn-default">Submit</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">网站信息 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo U('Config/site_info');?>">站点信息</a></li>
                        <li><a href="<?php echo U('Config/clear_cache');?>"> 清除缓存</a></li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">欢迎<?php echo ($_SESSION['user']['username']); ?>管理员 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo U('Config/index');?>">修改密码</a></li>
                        <li><a href="<?php echo U('User/logout');?>">安全退出</a></li>
                        <li><a href="<?php echo U('About/index');?>">我的资料</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>

    
    <div class="row">
        <div class="col-md-8">

            <div class="panel panel-info">
                <div class="panel-heading">
                    <h3 class="panel-title"><img src="/Public/assets/admin/images/wav.gif" width="16" height="16">
                        我的相册集</h3>
                </div>
                <div class="panel-body">
                    上传照片，记录生活中的点点滴滴！
                </div>
            </div>
            <div class="row">
                <?php if(is_array($photos)): $i = 0; $__LIST__ = $photos;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$photo): $mod = ($i % 2 );++$i;?><div class="col-sm-6 col-md-4">
                        <div class="thumbnail">
                            <img data-src="holder.js" src="<?php echo ($photo["thumb"]); ?>"
                                 data-holder-rendered="true"
                                 style="height: 200px; width: 100%; display: block;">
                            <div class="caption">
                                <p><h4><?php echo ($photo["title"]); ?></h4>【<?php echo (date(('Y-m-d'),$photo["time"])); ?>】</p>
                                <p><?php echo ($photo["discription"]); ?></p>
                                <p><a href="#" class="btn btn-info btn-xs glyphicon glyphicon-trash"></a>
                                    【旅游相册】
                                </p>
                            </div>
                        </div>
                    </div><?php endforeach; endif; else: echo "" ;endif; ?>
            </div>


            <nav style="margin-left: 510px;">
                <ul class="pagination">
                    <li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
                    <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li><a href="#">5</a></li>
                    <li><a href="#" aria-label="Next"><span aria-hidden="true">»</span></a></li>
                </ul>
            </nav>
        </div>

        <div class="col-md-4">
            <form action="/Admin/Photo/index.html" METHOD="post">
                <div class="panel panel-success">
                    <div class="panel-heading">
                        <a href="<?php echo U('add');?>" class="panel-title">上传美照</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="panel panel-default" style="bottom:0;">
        <div class="panel-body" style="text-align: center;">
            武汉长乐教育版权所有
        </div>
        <div class="panel-footer" style="text-align: center;">Copyright 2017-03</div>
    </div>

</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/Public/vendor/bootstrap/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/Public/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="/Public/vendor/nprogress/nprogress.js"></script>
<script type="text/javascript" src="/Public/vendor/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/Public/vendor/ueditor/ueditor.all.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('container');
</script>
<!--<script src="/Public/assets/admin/js/admin.js"></script>-->

    <script src="/Public/vendor/ckeditor/ckeditor.js"></script>
    <script src="/Public/vendor/ckfinder/ckfinder.js"></script>
    <script>
        $(function () {
            //上传缩略图（单张图片）
            $("#ck_thumb_upload").click(function () {
                CKFinder.modal({
                    chooseFiles: true,
                    language: 'zh-cn',
                    onInit: function (finder) {
                        finder.on('files:choose', function (evt) {
                            var url = evt.data.files.first().getUrl();
                            $("#thumb").val(url);
                            $("#img_show").attr('src', url);
                        });
                    }
                });
            });

        })
    </script>

</body>
</html>